package com.ldc.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ldc.model.File;
import com.ldc.service.mapper.FileMapper;
import com.ldc.service.service.FileService;
import org.springframework.stereotype.Service;

/**
 * 功能描述
 *
 * @author liudi
 * @since 2023/7/23
 */
@Service
public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements FileService {
    @Override
    public File findBy(LambdaQueryWrapper<File> queryWrapper) {
        return getOne(queryWrapper);
    }

    @Override
    public File findByFileId(String fileId) {
        return findBy(new LambdaQueryWrapper<File>().eq(File::getId, fileId));
    }
}
